Scale Subroutine

public subroutine Scale(grid, sc)

apply scale factor to a grid_real

Arguments

Type IntentOptional Attributes Name
type(grid_real), intent(inout) :: grid
real(kind=float), intent(in) :: sc

Variables

Type Visibility Attributes Name Initial
integer, public :: i
integer, public :: j

Source Code

SUBROUTINE Scale &
!
(grid, sc)

IMPLICIT NONE

!Arguments with intent(in):
REAL (KIND = float), INTENT(IN) :: sc

!Arguments with intent(inout):
TYPE(grid_real), INTENT(INOUT) :: grid

!Local declarations
INTEGER :: i,j
!------------end of declaration------------------------------------------------

DO i = 1, grid % idim
  DO j = 1, grid % jdim
    IF (grid % mat (i,j) /= grid % nodata) THEN
      grid % mat (i,j) = grid % mat (i,j) * sc
    END IF
  END DO
END DO

END SUBROUTINE Scale